package  com.cyys.common.exception;

public class GuaranteeRuntimeException extends RuntimeException {

	public GuaranteeRuntimeException() {
	}

	public GuaranteeRuntimeException(String message) {
		super(message);
	}

	public GuaranteeRuntimeException(Throwable cause) {
		super(cause);
	}

	public GuaranteeRuntimeException(String message, Throwable cause) {
		super(message, cause);
	}

	public static GuaranteeRuntimeException findshopException(Throwable e) {
		if (e instanceof GuaranteeRuntimeException)
			return (GuaranteeRuntimeException) e;
		Throwable pe = e.getCause();
		while (pe != null && pe != e) {
			if (pe instanceof GuaranteeRuntimeException)
				return (GuaranteeRuntimeException) pe;
			e = pe;
			pe = e.getCause();
		}
		return null;
	}
}
